package com.demo.sharelucas.sealeds;

// Circle 类继承自封闭类 Shape
public final class Circle extends Shape {
    private final double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public double area() {
        return Math.PI * radius * radius;
    }

    public void getName(){
        System.out.println("I am a circle.");
    }

}